EJB-EJB MCQ / Java Technologies Sample Test,Sample questions

Question:
 An different programming language like C ,C++ etc.

1.1,2

2.1

3.2

4.None of the above


Question:
 At what point, precisely, in the life-cycle is a container-managed entity bean considered created?

1.Immediately prior to the execution of its ejbCreate() method

2.Immediately after the execution of its ejbCreate() method

3.After the CMP bean's data has been committed to the underlying persistent datastore

4.During the execution of its ejbPostCreate() method


Question:
 Choose different kinds of enterprise beans in EJB from following

1.Session beans

2. Entity beans

3.Message-driven beans

4. All of the above


Question:
 From the following APIs, which API does NOT guarantees to be supported by EJB 2.0 containers?

1. JAXP

2.JNDI

3. JXTA

4.JDBC


Question:
 How can a EJB pass it's reference to another EJB ? Which of the following is correct syntax for an Abstract class?

1.abstract double area() { }

2.abstract double area()

3.abstract double area();

4.abstract double area(); { }


Question:
 In ___________, one message is delivered to one receiver only.

1.CTP Model

2.ATP Model

3. ZTP Model

4.PTP Model


Question:
 Session beans don't have

1. ejbCreate() method

2.ejbStore() method

3.ejbRemove() method

4.None


Question:
 The EJB specification architecture does NOT define

1. transactional components

2.client side security and encryption

3. distributed object components

4. server-side components


Question:
 To expose a service through RMI, you have to create the service interface that extends

1. java.rmi.Remote

2.. java.rmi.RemoteException

3. All of the mentioned

4.None of the above


Question:
 What executes EJB components?

1. A web server

2. An application server

3. An EJB container

4.A database server


Question:
 Which case of a session bean obtains the UserTransaction object via the EJBContext using the getUserTransaction() method in EJB transaction management?

1. Bean-managed transactions

2. Container-managed transactions

3.Both A & B

4.None of the above


Question:
 Which middleware services are provided by EJB?

1.Security

2.Transaction Management

3.Both A & B

4.None of the above


Question:
 Which of the following annotation is used to specify or inject a dependency as ejb instance into another ejb?

1.javax.ejb.Stateless

2.javax.ejb.Stateful

3.javax.ejb.MessageDrivenBean

4.javax.ejb.EJB


Question:
 Which of the following is true?

1. Preserving of any state across method calls does not performed by Stateless session beans

2.Multiple users can access Stateful session beans at the same time

3.Both are correct

4.None


Question:
 Which server-side component is required to be deployed on the server?

1. EJB

2.RMI

3.Both A & B

4.None of the above


Question:
. What happens when you pass a serialized object as an argument or return value that doesn't exist either in the Client or the Server?

1.Nothing will happpen

2.An error will occur

3.A run time exception is produced

4.None of these


Question:
. Which EJB container must provide an implementation of Java Naming and Directory Interface (JNDI) API to provide naming services for EJB clients and components?

1.Transaction support

2. Persistence support

3.Naming support

4.All mentioned above


Question:
A class is serializable if a class's inheritance hierarchy implements _________.

1.Serializable and Externalizable

2.Serializable or Externalizable

3.Event and Listener

4.Persistence


Question:
A Stateless session bean is a business object that doesn't maintain the conversational state with the client.

1.TRUE

2.FALSE

3.Can be true or false

4.Can not say


Question:
Abbreviate the term JMS?

1.Java Message Service

2.Java Monitor Service

3.Java Message Session

4.Java Monitor Session


Question:
An entity bean's local interface MUST extend the ________ interface.

1. javax.ejb.EJBLocalObject

2. javax.ejb.EJBObject

3.javax.ejb.RemoteObject

4.None of the above


Question:
Do clients of EJB instantiate beans directly?

1.Yes.

2.No. They need a reference from the EJB container.

3.No. They need a reference from the Java container.

4.Yes, and they act immediately.


Question:
EJB applications are deployed on a ____ compliant Application Server.

1.IEEE

2.J2EE

3.OSHA

4.SERI


Question:
EJB is a framework for _____

1.Java

2.C++

3.sap

4.windows


Question:
For remote objects Java passes objects:

1.By reference

2.By object copy

3.By producing a serialized copy

4. B and C are correct


Question:
How many types of enterprise bean in java?

1.2

2.3

3.4

4.None of the above


Question:
How many types of session bean?

1.1

2.2

3.3

4.4


Question:
If you wanted to control the WebLogic Server EJB’s configuration, what is one of the files you would use?

1.ejk.xml

2.erb-jub.xml

3.erp.txt

4. ejb-jar.xml


Question:
In passivation, the opposite method from ejbPassivate() is _______.

1.ejbLoad()

2.ejbNew()

3.ejbActivate()

4. ejbCreate()


Question:
In passivation, the opposite method from ejbPassivate() is _______.

1.ejbLoad()

2.ejbNew()

3.ejbActivate()

4.ejbCreate()


Question:
In which model, one message is delivered to all subscribers?

1. Publisher model

2. Subscriber model

3.Both A and B

4.None of the above


Question:
Message Driven Bean (MDB) encapsulates business logic. It is invoked by passing the message. It is like JMS receiver.

1.RUE

2.FALSE

3. Can be true or false

4.Can not say


Question:
OpenEJB 3.1.1 supports

1.EJB 2.x components

2.EJB 3.0 and EJB 3.1 components

3.All of the mentioned

4.None of the mentioned


Question:
remove() method of the Entity bean?

1.Remove the row of table from the database

2.Remove the instance from pool

3.Delete the TABLE from the database

4.None of the above


Question:
The Spring support classes facilitate building session beans

1.stateful session beans (SFSBs)

2. stateless session beans (SLSBs)

3.message-driven beans (MDBs)

4.All of the mentioned


Question:
The _______ file is an XML file used to describe the properties of a bean.

1.Application archive

2.Bean JAR✖

3.Deployment Descriptor

4.XML Property


Question:
The _______ file is an XML file used to describe the properties of a bean.

1.Application archive

2.Bean JAR

3.Deployment Descriptor

4.XML Property


Question:
The _______ is the most common exception class.

1.EJBException

2.BeanException

3.NullPointerException

4.RuntimeException


Question:
The _______ is the most common exception class.

1.EJBException

2.BeanException

3.NullPointerException

4.RuntimeException


Question:
What are ACID transactions responsible for?

1.Reliable database transactions.

2.Mobile-to-website interfacing.

3.Customer relations.

4.Data to processor interfacing.


Question:
What are the advantages of JMS?

1.Asynchronous

2.Reliable

3.Both A and B

4. None of the above


Question:
What bean represents real-world objects?

1.Entity bean.

2.Sessionless Bean.

3.Stateful Bean.

4.Singleton Session Bean.


Question:
What does it mean when business objects have a state?

1.They have many clients.

2.They have no clients.

3. They have only two clients.

4.They are limited to a single client at a time


Question:
What file format are all of the descriptor files in?

1.txt

2.HTML

3.PDF

4.XML


Question:
What format is the deployment descriptor document in?

1.XML

2.doc

3.html

4.PDF


Question:
What is another name for a deployment descriptor?

1.Caching between transactions.

2.Processing dual beans.

3.Processing dual-state beans.

4. Caching entire programs.


Question:
What is CMC?

1.Container-managed concurrency.

2.Currently Managed Content

3.Counter-managed contingency.

4.Concurrent-managed content.


Question:
What is concurrency control?

1.The control of a single operation in two different ways.

2.The control of single operations in different ways.

3.The control of a single operation in many different ways.

4.The ensuring that two operations within EJB are generated correctly.


Question:
What is concurrency control?

1.The control of a single operation in two different ways.

2.The control of single operations in different ways.

3.The control of a single operation in many different ways.

4.The ensuring that two operations within EJB are generated correctly.


Question:
What is returned by the method ejbCreate() CMP bean?

1.Null

2. Primary Key class

3. Home Object

4.Remote Object


Question:
What is RMI-IIOP?

1.The Java Remote Operation Schedule.

2.Java Remote Method Invocation interface.

3.The Java Open Access Module.

4.The Java Express Services Daemon.


Question:
When injection is not available, what is the alternative?

1.Nothing is available

2.Bean interface.

3.Java interface.

4.Java Naming and Directory Interface


Question:
Where are the EJB classes utilized by applications retained?

1.Within the javax.ejb package.

2.Within the javax.ejb package.

3.Within the Javascript package.

4.Within the rava.xml package.


Question:
Which component does the Entity bean represent the persistent data stored in the database?

1. Server-side component

2.Client-side component

3. Server and client side component

4.None of the above


Question:
Which of the following contains the EJB container that provides the services for the EJB component?

1.Component client.

2.EJB client.

3.EJB Server

4.Java client.


Question:
Which of the following statements is not correct for an Enterprise Java Bean?

1.Entity beans model business data

2.Session beans model business processes

3.Message beans send synchronous messages

4.None of the above <br>


Question:
Which statement about session beans is true?

1.In both stateless and statefull session classes, the bean provider must write the method public void remove()

2.The method << remove >> in the component interface can be accessed only by the remote clients

3. The bean's handle must be provided by the client, in order to ask the EJBHome for removing a session bean

4.None of the above


Question:
______ is a messaging service to create, send and receive messages asynchronously.

1. RMS

2.JMS

3.GDS

4.KAD


Question:
______ is not a tag used in an XML bean archive to define a primitive type.

1. <byte>

2.<int>

3.<double>

4.<object>


Question:
________ encapsulates business logic.

1.Message Driven Bean

2.Entity Bean

3. Object Bean

4. Session Bean


More MCQS

  1. EJB Core Java Mcq Questions
  2. EJB MCQ - Java Technologies
  3. EJB MCQ QUESTIONS AND ANSWER
  4. Advanced EJB MCQ QUESTION AND ANSWER
  5. EJB MCQ QUESTIONS AND ANSWER
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!